package com.yubest.demo.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * @Description:响应实体,签名实体
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(exclude="secret") ////输出字符串时排除字段
@JsonIgnoreProperties(value = "secret") //输出json时排除字段
public class ResponseSign<T> implements Serializable {

    private static final long serialVersionUID = 4921114729569667431L;

    //状态码，200为成功，其它为失败
    private Integer code;

    //消息提示
    private String message;

    //时间戳
    private String timestamp;

    //版本号
    private String version;

    //签名
    private String sign;

    //数据对象
    private T data;

    //动态签名秘钥,输出时隐藏
    private String secret;

}
